package bulk_param.numspe.controller;

import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.sql.Timestamp;
import java.text.ParseException;
import java.util.Date;

import javax.swing.BorderFactory;
import javax.swing.JOptionPane;

import bulk_param.dao.InactivationPointDao;
import bulk_param.modele.InactivationPointModel;
import bulk_param.view.NumSpe_Inactive_View;


public class TextZABPQInactiveListener implements KeyListener{
	
	private NumSpe_Inactive_View numSpe_Inactive_View;
	private InactivationPointModel inactivationPointModel;
	private InactivationPointDao inactivationPointDao;
	
	
	
	public TextZABPQInactiveListener(NumSpe_Inactive_View numSpe_Inactive_View){
		this.numSpe_Inactive_View=numSpe_Inactive_View;
		inactivationPointModel = new InactivationPointModel();
	}

	@Override
	public void keyTyped(KeyEvent e) {
	}

	@Override
	public void keyPressed(KeyEvent e) {
	}

	@Override
	public void keyReleased(KeyEvent e) {
		// TODO Auto-generated method stub
		if(numSpe_Inactive_View.txtZABPQ.getText().length()>=2){
			if(numSpe_Inactive_View.txtZABPQ.getText().substring(1, 2).equalsIgnoreCase("1")){
				numSpe_Inactive_View.lbZABPQ.setText("Point(0118 XYZ) : ");
			}
			if(numSpe_Inactive_View.txtZABPQ.getText().substring(1, 2).equalsIgnoreCase("3")){
				numSpe_Inactive_View.lbZABPQ.setText("Point(03BPQ) : ");
			}
			if(numSpe_Inactive_View.txtZABPQ.getText().substring(1, 2).equalsIgnoreCase("8")){
				numSpe_Inactive_View.lbZABPQ.setText("Point(0800) : ");
			}
		}
	}
}


